lst = [10, 30, 89, 99, 27, 66]

for i in range(1, len(lst)):
    a = i
    for j in range(i-1, -1, -1):
        if lst[i] < lst[j]:
            a = j
        else:
            break
    lst.insert(a, lst[i])
    lst.pop(i+1)

print(lst)
